package com.novoda.runbuddy.provider;

import android.net.Uri;
import android.provider.BaseColumns;

public final class RunBuddyCP {

	public static final class Routes implements BaseColumns {
		public static final Uri		CONTENT_URI			= Uri.parse("content://com.novoda.runbuddy/routes");
		public static final String	LONGITUDE			= "longitude";
		public static final String	LATITUDE			= "latitude";
		
		// Will work on this - currently programmaticaly
		public static final String	SPAN_LONGITUDE		= "longitudeSpan";
		public static final String	SPAN_LATITUDE		= "latitudeSpan";
		public static final String	NAME				= "name";
		public static final String	SERVER_ID			= "__id";
		public static final String	CREATED_DATE		= "createdAt";
		public static final String	MODIFIED_DATE		= "modifiedAt";
		public static final String	DEFAULT_SORT_ORDER	= "route.name DESC";
	}

	public static final class RoutePoints implements BaseColumns {
		public static final Uri		CONTENT_URI			= Uri.parse("content://com.novoda.runbuddy/routes/#/points");
		public static final String	LONGITUDE			= "longitude";
		public static final String	LATITUDE			= "latitude";
		public static final String	ALGORITHM			= "algorithm";
		public static final String	DIRECTION			= "direction";
		// TODO point number should be appended to the url instead of here.
		//public static final String	POINT_NO			= "pointNo";
		public static final String	CREATED_DATE		= "createdAt";
		public static final String	MODIFIED_DATE		= "modifiedAt";
		public static final String	DEFAULT_SORT_ORDER	= "routePoint.pointNo DESC";
	}

	public static final class RouteSegments implements BaseColumns {
		public static final Uri		CONTENT_URI			= Uri.parse("content://com.novoda.runbuddy/route/#/segments");
		// The checkPoint is returned as a String content://<>/checkpoints/#
		public static final String	CHECKPOINT			= "checkpoint";
		// Get from the Uri
		//public static final String	CHECKPOINT_NO		= "checkpointNo";
		public static final String	DISTANCE			= "distance";
		public static final String	DEFAULT_SORT_ORDER	= "checkPointNo DESC";
	}

	public static final class Runs implements BaseColumns {
		public static final Uri		CONTENT_URI			= Uri.parse("content://com.novoda.runbuddy/routes/#/runs");
		public static final String	NAME				= "name";
		public static final String	TOTAL_TIME			= "totalTime";
		public static final String	CREATED_DATE		= "createdAt";
		public static final String	MODIFIED_DATE		= "modifiedAt";
		public static final String	DEFAULT_SORT_ORDER	= "createdAt DESC";
	}

	public static final class RunSegments implements BaseColumns {
		public static final Uri		CONTENT_URI			= Uri.parse("content://com.novoda.runbuddy/routes/#/runs/#/segments");
		// The checkPoint is returned as a String content://<>/checkpoints/#
		public static final String	CHECKPOINT			= "checkpoint";
		public static final String	CHECKPOINT_NO		= "checkpointNo";
		public static final String	TIME				= "segmentTime";
		public static final String	LAP					= "lap";
		public static final String	CREATED_DATE		= "createdAt";
		public static final String	MODIFIED_DATE		= "modifiedAt";
		public static final String	DEFAULT_SORT_ORDER	= "checkPointNo DESC";
	}

	public static final class GeoLocations implements BaseColumns {
		public static final Uri		CONTENT_URI			= Uri.parse("content://com.novoda.runbuddy/geolocations");
		public static final String	NAME				= "name";
		public static final String	ADDRESS_1			= "address1";
		public static final String	ADDRESS_2			= "address2";
		public static final String	ALTITUDE			= "altitude";
		public static final String	COUNTRY_CODE		= "countryCode";
		public static final String	LONGITUDE			= "longitude";
		public static final String	LATITUDE			= "latitude";
		public static final String	POSTCODE			= "postCode";
		public static final String	CREATED_DATE		= "createdAt";
		public static final String	MODIFIED_DATE		= "modifiedAt";
		public static final String	DEFAULT_SORT_ORDER	= "name DESC";
	}

	public static final class CheckPoints implements BaseColumns {
		public static final Uri		CONTENT_URI			= Uri.parse("content://com.novoda.runbuddy/checkpoints");
		public static final String	ALTITUDE			= "altitude";
		public static final String	LONGITUDE			= "longitude";
		public static final String	LATITUDE			= "latitude";
		public static final String	SERVER_ID			= "__id";
		public static final String	NAME				= "name";
		public static final String	DESCRIPTION			= "description";
		public static final String	IMPLEMENTOR			= "implementor";
		public static final String	CREATED_DATE		= "createdAt";
		public static final String	MODIFIED_DATE		= "modifiedAt";
		public static final String	DEFAULT_SORT_ORDER	= "name DESC";
	}
}
